The present invention relates to a printer device, and more particularly to a technique related to signal processing in a printer device that is connected to a data processing device via an external recording device through parallel interfaces provided with specified control signal cables.
It is a conventionally known technique to connect a printer device to a data processing device via an external recording device through parallel interfaces provided with specified control signal cables wherein the printer device receives printing data from the data processing device for enabling printing in this condition. In such a case, it is made possible to control actions of the external recording device through the data processing device even though the printer device is executing printing. Further, detection of types of received signals is performed in the printer device in that the control means (namely a CPU) governing control of the entire device performs confirmation of conditions of signals at specified intervals. It is also suggested for an error notification mechanism in a printer device for notifying the data processing device (namely a host personal computer) of errors on side of the printer device by utilizing parallel interfaces (see, for instance, Japanese Patent Application Laid-Open Publication No. 8-63300 (1996)).
However, it is the case with such a printer device that is connected to a data processing device via an external recording device as explained above that in case the external recording device is actuated by the data processing device when the printer device is executing printing, the external recording device outputs, upon access between the data processing device and the external recording device, a signal to the printer device that is identical to a signal for instructing start of communication (for instance, signal identical to Event 1 of IEEE 1284 standard). When the control means of the printer device receives this signal, processes for starting communication with the data processing device are performed so as to assume a condition in which printing data can be received from the data processing device even though preparations for receiving the printing data are not finished yet so that printing data may be lost. For detecting received signals in the printing device, intervals for confirming signals cannot be made shorter in view of limited processing performance of the control means, it could not be accurately detected whether signals are correct or not. For instance, in case confirmation of signals could only be performed by the control means at every 2 ms (milliseconds), it could not be determined whether the condition of the signal was persistent during a period starting from a point at which the signal was first confirmed up to a point at which a signal was confirmed after 2 ms, or whether the signal at a point that a signal is first confirmed is different from a signal at a point that a signal is confirmed after 2 ms.
The present invention has been made for solving the above problems, and it is an object thereof to provide a printer device that is connected to a data processing device via an external recording device through parallel interfaces provided with specified control signal cables wherein malfunctions owing to signals leaking out from the external recording device to the printer device can be prevented to maintain execution of normal printing actions and wherein correctness or incorrectness of received signals can be accurately detected.
According to one aspect of the present invention, in case the printer device has received a signal for instructing start of communication when printing actions are being executed, processes are performed in correspondence thereto for sending a signal to the data processing device indicating that the printer device is in a busy condition so that no condition capable of receiving signals is assumed in accordance with the signal for instructing start of communication but the printing actions that are being performed at that time are continued. Further, in case the signal indicating a busy condition is sent from the printer device to the data processing device and the data processing device is intentionally outputting the signal for instructing start of communication, a signal corresponding to the signal indicating a busy condition is output to the printer device whereupon the printer device performs normal actions in accordance with this signal. In case the data processing device is not intentionally outputting the signal for instructing start of communication, that is, in case an incorrect signal for instructing start of communication is sent from the external recording device to the printer device, the data processing device ignores the signal for indicating a busy condition and gives no response to the printer device so that the printer device considers the signal for instructing start of communication to be invalid and continues the printing actions that are being performed at that time are continued.
According to another aspect of the present invention, detection of a signal that has been received from the data processing device is performed by the second control means without depending on the processing performance of the control means, so that signal detection can be performed at shorter sampling cycles than compared to a case in which the control means performs detection of signals. By the arrangement of enabling detection of signals at short sampling cycles, it can be more accurately detected whether the received signal is a signal for instructing start of communication or not and malfunctions can be reliably prevented.
According to further aspect of the present invention, detection of a correct signal is performed by the second control means whereby malfunctions of the printer device that are based on incorrect signals can be prevented. Even though an interrupt has been allowed through the received signal, in case the allowance for the interrupt has been given when printing actions are being executed, processes are accordingly performed for sending a signal indicating that the printer device is in a busy condition to the data processing device so that printing actions that are being performed at that time are continued. Thus, it can be prevented that the printer device performs malfunctions in case the data processing device is not intentionally outputting a signal for instructing start of communication.